package com.snow.fkisoftstone.bean;

import android.text.TextUtils;

import com.snow.fkisoftstone.Utils;

public class WorkTime {
    private int index;

    private String day;
    private String week;
    private String startTimeStr;
    private String endTimeStr;

    private float workTime;

    public WorkTime(String day, String week, String startTimeStr, String endTimeStr) {
        this.day = day;
        this.week = week;
        this.startTimeStr = startTimeStr;
        this.endTimeStr = endTimeStr;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public float getWorkTime() {
        return workTime;
    }

    public void setWorkTime(float workTime) {
        this.workTime = workTime;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public String getWeek() {
        return week;
    }

    public void setWeek(String week) {
        this.week = week;
    }

    public String getStartTimeStr() {
        return startTimeStr;
    }

    public void setStartTimeStr(String startTimeStr) {
        this.startTimeStr = startTimeStr;
    }

    public String getEndTimeStr() {
        return endTimeStr;
    }

    public void setEndTimeStr(String endTimeStr) {
        this.endTimeStr = endTimeStr;
    }

    public void generateWorkTime(){
        this.workTime= Utils.getWorkTime(startTimeStr,endTimeStr);
    }
    public void generateIndex(){
        this.index= Integer.parseInt(day.split("-")[2]);
    }

    public String getString() {
        return
                day + "  " + week + "  " + startTimeStr + "  "  + endTimeStr ;
    }

    @Override
    public String toString() {
        return "WorkTime{" +
                "day='" + day + '\'' +
                ", week='" + week + '\'' +
                ", startTimeStr='" + startTimeStr + '\'' +
                ", endTimeStr='" + endTimeStr + '\'' +
                '}';
    }
}
